package com.example.shopspring.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.shopspring.common.ResultData;
import com.example.shopspring.entity.StaFirst;
import com.example.shopspring.mapper.StaFirstMapper;
import com.example.shopspring.service.StaFirstService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StaFirstServiceImpl extends ServiceImpl<StaFirstMapper, StaFirst> implements StaFirstService {
    @Override
    public ResultData getList(int status) {
        LambdaQueryWrapper<StaFirst> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(StaFirst::getStatus, status);
        List<StaFirst> list = list(queryWrapper);
        return ResultData.success(list);
    }
}
